﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SLHUDSystem
{
    public class HUDItem
    {
        public int Index;
        public bool IsDirty
        {
            get { return m_IsDirty; }
            set {
                if (value == true)
                {
                    OnDirtyChanged?.Invoke(Index);
                }
                m_IsDirty = value; 
            }
        }

        private bool m_IsDirty;

        public Action<int> OnDirtyChanged;

        public virtual void UpdateHUDItem()
        {
            m_IsDirty = false;
        }
    }
}
